import Home from '@/views/home.vue'
import HotelDetail from '@/views/hotelDetail.vue'
import Login from '@/views/Login.vue'
import My from '@/views/My.vue'
import MyOrder from '@/views/MyOrder.vue'
import UserDetail from '@/views/userDetail.vue'
import ToPay from '@/views/ToPay.vue'
import CancelEarly from '@/views/CancelEarly.vue'
import { createRouter, createWebHistory } from 'vue-router'
import MyWeb3 from '@/views/myWeb3.vue'
import OrderDetail from '@/views/orderDetail.vue'
import Comment from '@/views/comment.vue'
import myComment from '@/views/myComment.vue'
import FlowDetail from '@/views/flowDetail.vue'
import SignUp from '@/views/signUp.vue'
import HotelSearchList from '@/views/hotelSearchList.vue'
import HDetail from '@/views/hDetail.vue'
import Test from '@/views/test.vue'

import CheckoutEarly from '@/views/CheckoutEarly.vue'
import MessageList from '@/views/MessageList.vue'




const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {path:"/" , redirect:"/home"  },
    {path:"/home" , component:Home},
    {path:"/login" , component:Login},
    {path:"/my" , component:My, redirect: "/myOrder", 
      children: [
        {path: '/myOrder', component: MyOrder,},
        {path:'/userDetail' ,component:UserDetail},
        {path:'/myComment' ,component:myComment},
        {path:'/messageList' ,component:MessageList},
    ]},
    {path:"/hotelDetail",component:HotelDetail},
    {path:"/toPay",component:ToPay},
    {path:"/cancelEarly",component:CancelEarly},
    
    {path:'/comment' ,component:Comment},
    {path:'/myWeb3' ,component:MyWeb3},
    {path:'/orderDetail/:id' ,component:OrderDetail},
    { path: '/flowDetail/:transactionsId', component: FlowDetail },
    {path:'/signUp' ,component:SignUp},
    {path:'/hotelSearchList' ,component:HotelSearchList},
    {path:'/hDetail/:id' ,component:HDetail},
    {path:'/test' ,component:Test},

    {path:'/checkoutEarly',component:CheckoutEarly},


    {path:'/checkoutEarly',component:CheckoutEarly},
    
  ],
})

export default router
